package service

import (
	"context"
	"ruoyi-go-echo-ddd/internal/domain/model"
	"ruoyi-go-echo-ddd/internal/domain/repository"
)

type SysRoleMenuService struct {
	repo repository.SysRoleMenuRepository
}

func NewSysRoleMenuService(repo repository.SysRoleMenuRepository) *SysRoleMenuService {
	return &SysRoleMenuService{repo: repo}
}

func (s *SysRoleMenuService) DeleteByRoleId(ctx context.Context, roleId int64) (int64, error) {
	return s.repo.DeleteByRoleId(ctx, roleId)
}

func (s *SysRoleMenuService) BatchInsert(ctx context.Context, list []*model.SysRoleMenu) (int64, error) {
	return s.repo.BatchInsert(ctx, list)
}
